package com.ftg.learn.chapter18;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author KangJx
 * @date 2021/8/26
 */
@Data
@AllArgsConstructor
public class Emp implements Comparable<Emp> {

    private int sno;

    private String sname;


    @Override
    public int compareTo(Emp o) {
        return this.getSno() - o.getSno();
    }
}
